function checkAccountID(){
	var accountID = document.getElementById("").value;
}
/**
*删除左右两端的空格
*/
String.prototype.trim=function(){   
  	return this.replace(/(^\s*)|(\s*$)/g, '');
}  
/**
*删除左边的空格
*/
String.prototype.ltrim=function()
{
  return this.replace(/(^s*)/g,'');
}
/**
*删除右边的空格
*/
String.prototype.rtrim=function()
{
  return this.replace(/(s*$)/g,'');
}

function checkProblemID() {
	var problemID = document.getElementById("problemID").value;
	if(problemID.trim()==""||problemID==null){
		str = "&nbsp;题号不能为空";
		document.getElementById("problemID.info").innerHTML=str;
	}else{
		str = "*";
		document.getElementById("problemID.info").innerHTML=str;
		return true;
	}
	return false;
}
function checkProblemTitle() {
	var problemTitle = document.getElementById("problemTitle").value;
	if(problemTitle.trim()==""||problemTitle==null){
		str = "&nbsp;标题不能为空";
		document.getElementById("problemTitle.info").innerHTML=str;
	}else{
		str = "*";
		document.getElementById("problemTitle.info").innerHTML=str;
		return true;
	}
	return false;
}

function checkSourceCode(){
	var sourceCode = document.getElementById("sourceCode").value;
	if(sourceCode.trim()==""||sourceCode==null){
		str = "&nbsp;代码不能为空";
		document.getElementById("sourceCode.info").innerHTML=str;
	}else{
		str = "*";
		document.getElementById("sourceCode.info").innerHTML=str;
		return true;
	}
	return false;
}

//最后检查表单是否合格
function testForm(){
	if(!checkProblemID()||!checkProblemTitle()||!checkSourceCode()){
		return false;
	}
	return true;
}

